{extend name="common/default" /}
{block name="content"}
<div class="page-content">
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <a href="{:url('index/index')}">系统</a>
            </li>
            <li class="active">商品分类管理</li>
        </ul>
    </div>
    <div class="page-body">
        <button type="button" tooltip="添加商品分类" class="btn btn-sm btn-azure btn-addon" onClick="javascript:window.location.href = '{:url('category/add')}'">
            <i class="fa fa-plus"></i> Add
        </button>
        <div class="row">
            <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="widget">
                    <div class="widget-body">
                        <form class="flip-scroll" action="{:url('category/lst')}" method="post">
                            <table class="table table-bordered table-hover">
                                <thead class="">
                                <tr>
                                    <th class="text-center" width="8%">ID</th>
                                    <th class="text-center">分类名称</th>
                                    <th class="text-center" width="8%">显示到导航</th>
                                    <th class="text-center" width="8%">排序</th>
                                    <th class="text-center" width="14%">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="categoryRes" id="categoryRess"}
                                    <tr>
                                        <td align="center">{$categoryRess.id}</td>
                                        <td align="left"><?php echo str_repeat('-',$categoryRess['level']*8) ?>{$categoryRess.cate_name}</td>
                                        <td align="center">{if condition="$categoryRess['show_cate'] eq 1"}
                                            <img height="30" src="__admin__/images/gou.png" alt="">
                                            {else /}
                                            <img height="30" src="__admin__/images/errori.png" alt="">
                                            {/if}</td>
                                        <td align="center">
                                            <input type="text" style="width: 60px;text-align: center" name="sort[{$categoryRess.id}]" value="{$categoryRess.sort}">
                                        </td>
                                        <td align="center">
                                            <a href="{:url('category/edit',['id'=>$categoryRess['id']])}" class="btn btn-primary btn-sm shiny">
                                                <i class="fa fa-edit"></i> 编辑
                                            </a>
                                            <a href="#" onClick="warning('确实要删除吗','{:url('category/del',['id'=>$categoryRess['id']])}')" class="btn btn-danger btn-sm shiny">
                                                <i class="fa fa-trash-o"></i> 删除
                                            </a> 
                                        </td>
                                    </tr>
                                {/volist}
                                <tr>
                                    <td colspan="6" align="right" style="padding-right: 16.5%">
                                        <input  type="submit" class="btn btn-danger btn-sm shiny"  value="排序">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            </form>
                        </div>
                        </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
</div>
</div>
</div>
{/block}